package com.bmcsoft.ui;

/**
 * @User: Alan
 * @Date: 2019/9/23
 * @Time: 15:14
 * @Version: 1.0
 */


import com.bmcsoft.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 */
public class Client {

    public static void main(String[] args) {
        //1、获取核心容器对象
        ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");
        //2、根据id获取bean对象
//        AccountService as = (AccountService)ac.getBean("accountService");
//        as1.saveAccount();
//
//        AccountService as = (AccountService)ac.getBean("accountService2");
//        as.saveAccount();

        AccountService as = (AccountService)ac.getBean("accountService3");
        as.saveAccount();


    }
}
